package com.eonmind.ai.service;

import com.eonmind.ai.dto.AiChatDto;
import com.eonmind.common.contract.data.response.PageResponse;
import com.eonmind.common.contract.data.response.ResponseEntity;
import com.eonmind.common.provider.entity.ai.AiConversation;
import com.eonmind.user.contract.dto.UserInfoData;
import reactor.core.publisher.Flux;

public interface IAiConversationService {
    PageResponse<AiChatDto.AiConversationData> pageConversation(UserInfoData userInfoData, AiChatDto.AiConversationPageRequest pageRequest);

    AiChatDto.AiConversationData createConversation(UserInfoData userInfoData, AiChatDto.AiConversationCreateRequest createRequest);

    void editConversation(UserInfoData userInfoData, AiChatDto.AiConversationEditRequest editRequest);

    void delConversation(UserInfoData userInfoData, AiChatDto.AiConversationDelRequest delRequest);

    Flux<ResponseEntity<AiChatDto.AiChatData>> chat(Long userId, AiChatDto.AiChatRequest aiChatRequest);

    AiConversation selectConversationById(Long conversationIdLong);

    void incrementTotalToken(Long id, Integer totalTokens);

}
